package com.tgy.crud.exception;

import com.tgy.crud.common.ResultCode;
import lombok.Data;
import lombok.Setter;


public class CrudException extends RuntimeException {

    private static final long serialVersionUID = -2391737207743420448L;
    private ResultCode code;

    public CrudException(ResultCode code,String message){

        super(message);
        this.code = code;
    }

    public CrudException(ResultCode code){

        this(code,null);
    }

    public ResultCode getCode() {
        return code;
    }
}
